from flask import Flask,abort,request,render_template
app = Flask(__name__)
@app.route('/index',methods = ['GET','POST'])
def index():
    if request.method == 'GET':
        return render_template('index.html')
    if request.method == 'POST':
        name =  request.form.get('name')
        password = request.form.get('password')
        if name == 'zhansan' and password == '123456':
            return 'login success'
        else:
            abort(404)

if __name__ == '__main__':
    app.run()